//
//  PreviewProductOrderResModel.swift
//  koolcar
//
//  Created by xiantian on 2023/11/4.
//

import UIKit
import ObjectMapper

class PreviewProductOrderResModel: Mappable {
    var code: String?
    var msg: String?
    var data: PreviewProductOrderDataModel?
    
    func mapping(map: Map) {
        code <- map["code"]
        msg <- map["msg"]
        data <- map["data"]
    }
    required init?(map: Map) {
        
    }
}

class PreviewProductOrderDataModel: Mappable {
    var createdTime : String?
    var delFlag : Int?
    var depositAmount : Float?
    var effectiveTime : String?
    var email : String?
    var firstName : String?
    var items : [PreviewProductItemModel]?
    var lastName : String?
    var memberAccount : String?
    var memberId : Int?
    var memberName : String?
    var memberPhone : String?
    var orderNo : String?
    var orderTime : String?
    var payType : String?
    var paymentName : String?
    var paymentPhone : String?
    var price : Double?
    var status : Int?
    var type : Int?
    
    func mapping(map: Map) {
        createdTime <- map["createdTime"]
        delFlag <- map["delFlag"]
        depositAmount <- map["depositAmount"]
        effectiveTime <- map["effectiveTime"]
        email <- map["email"]
        firstName <- map["firstName"]
        items <- map["items"]
        lastName <- map["lastName"]
        memberAccount <- map["memberAccount"]
        memberId <- map["memberId"]
        memberName <- map["memberName"]
        memberPhone <- map["memberPhone"]
        orderNo <- map["orderNo"]
        orderTime <- map["orderTime"]
        payType <- map["payType"]
        paymentName <- map["paymentName"]
        paymentPhone <- map["paymentPhone"]
        price <- map["price"]
        status <- map["status"]
        type <- map["type"]
    }
    required init?(map: Map) {
        
    }
}

class PreviewProductItemModel: Mappable {
    var delFlag : Int?
    var isLimitedTime : Int?
    var isValid : Bool?
    var memberDiscount : Int?
    var name : String?
    var orderPrice : Float?
    var parameterSnapshot : String?
    var price : Float?
    var productImages : String?
    var quantity : Int?
    var skuId : Int?
    var unitPrice : Float?
    var id: NSInteger?
    
    func mapping(map: Map) {
        delFlag <- map["delFlag"]
        isLimitedTime <- map["isLimitedTime"]
        isValid <- map["isValid"]
        memberDiscount <- map["memberDiscount"]
        name <- map["name"]
        orderPrice <- map["orderPrice"]
        parameterSnapshot <- map["parameterSnapshot"]
        price <- map["price"]
        productImages <- map["productImages"]
        quantity <- map["quantity"]
        skuId <- map["skuId"]
        unitPrice <- map["unitPrice"]
        productImages <- map["productImage"]//订单商品详情
        id <- map["id"]
        
    }
    required init?(map: Map) {
        
    }
}
